package com.mars.base.web.model;

import java.util.ArrayList;
import java.util.List;

public class DataGrid<T> {

	/**
	 * 总记录数
	 */
	private Long total;

	/**
	 * 表格 body 数据
	 */
	private List<T> rows;

	/**
	 * 表格 footer 数据
	 */
	private List<T> footer;

	public Long getTotal() {
		return total;
	}

	public void setTotal(Long total) {
		this.total = total;
	}

	public List<?> getRows() {
		if (rows == null) {
			rows = new ArrayList<>();
		}
		return rows;
	}

	public void setRows(List<T> rows) {
		this.rows = rows;
	}

	public List<T> getFooter() {
		return footer;
	}

	public void setFooter(List<T> footer) {
		this.footer = footer;
	}

}
